package cn.rongdao.jrkabao.model.cashadvance;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/7/7
 */

public class CollectWebViewMsgModel extends BaseKaMaoModel {

    public static CollectWebViewMsgModel getInstance() {
        return getPresent(CollectWebViewMsgModel.class);
    }

    public void execute(String result, String url, Observer<String> observer) {
        addParamStrings("request_result", FRString.valueOf(result));
        addParamStrings("request_url", FRString.valueOf(url));
        Observable<String> observable = mServletApi.getWebViewMessage(mParams).map(new HttpFunction<String>());
        toSubscribe(observable, observer);
    }

}